import { defineStore } from 'pinia'
import axios from '@/config/axios'
export const useUserStore = defineStore('Knowledge_system',{
  state: () => ({
    userData: [],
    addtouch:[],
  }),
  actions: {
    //知识体系模版分页
    // async fetchUserData() {
    //   try {
    //     const response = await axios.get('/hierarchy/page')
    //     this.userData = response.data
    //   } catch (error) {
    //     console.error('请求失败', error)
    //   }
    // },
  },
  getters: {
    getUserData(state) {
      console.log(state);
      
      return state.userData
    },
  }
})
